package com.hbsi.demo1;

/**
 * @author yihong
 * @version 1.0
 */
public class TestCreateThread {
    public static void main(String[] args) {

        MyThread1 t1=new MyThread1("线程1");
        MyThread1 t2=new MyThread1("线程2");
        MyThread2 dd=new MyThread2();
        Thread t3=new Thread(dd);
        t1.setPriority(Thread.MAX_PRIORITY);
        t2.setPriority(Thread.MIN_PRIORITY);
        t3.setPriority(Thread.NORM_PRIORITY);
        t1.start();
        t2.start();//进行线程的调度
        t3.start();
        System.out.println(t1.getPriority());
        System.out.println(t2.getPriority());
        System.out.println(t3.getPriority());
        int i=0;
//        while(i<=10){
//            System.out.println("main方法");
//            i++;
//        }
    }
}